import Service from '@/utils/request'
import type { IpageParms } from '@/constrain/interface'

class CourseService extends Service {
	//获取课程列表
	getCourseData(params: IpageParms) {
		return this.get({ url: `/api/edu/course/${params.page}/${params.limit}` })
	}

	//获取课程详情
	getCourseDetailData(id: string) {
		return this.get({ url: `/api/edu/course/${id}` })
	}

	//获取课程评论数据
	getCourseCommonListData(params: IpageParms) {
		return this.get({ url: `/api/edu/comment/${params.page}/${params.limit}`, data: { id: params.courseId } })
	}
}

export default new CourseService()